﻿Public Class ValueButton

    ' Creates the private variable that will store the value of your 
    ' property.
    Private varValue As Integer = 0

    ' Declares the property.
    Property ButtonValue() As Integer
        ' Sets the method for retrieving the value of your property.
        Get
            Return varValue

        End Get
        ' Sets the method for setting the value of your property.
        Set(ByVal Value As Integer)
            varValue = Value

        End Set
    End Property

    Private Sub ValueButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click

        If Me.ButtonValue = 0 Then
            Me.BackColor = Color.Brown
            Me.ButtonValue = 3

        else If Me.ButtonValue = 3 Then
            Me.BackColor = Color.Green
        Me.ButtonValue = 0
        End If

    End Sub
End Class
